package com.gxkj.projects.myshopx.entitys;


import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
@Entity
@Table(name = "user_rank")
public class UserRank  extends BaseModel{
    private static final long serialVersionUID = -6295404419279200077L;

    @Column(name="rank_name",nullable = false)
    @NotEmpty(message = "{rank_name.name.null}" )
    private String rankName;    //名称

    @Column(name="min_points",nullable = false)
    private int minPoints;    //积分下限

    @Column(name="max_points",nullable = false)
    private int maxPoints;    //积分上限

    @Column(name="discount",nullable = false)
    @Min(value = 10, message = "{rank_name.discount.min}")
    @Max(value = 100, message = "{rank_name.discount.max}")
    private  int discount;//初始折扣率

    //在商品详情页显示该会员等级的商品价格
    @Column(name="show_price",nullable = false)
    private int  showPrice;  //在商品详情页显示该会员等级的商品价格

    @Column(name="special_rank",nullable = false)
    private int  specialRank;  //特殊会员组的会员不会随着积分的变化而变化。

    @Column(name="is_del",nullable = false)
    private int  isDel;  //特殊会员组的会员不会随着积分的变化而变化。

    public String getRankName() {
        return rankName;
    }

    public void setRankName(String rankName) {
        this.rankName = rankName;
    }

    public int getMinPoints() {
        return minPoints;
    }

    public void setMinPoints(int minPoints) {
        this.minPoints = minPoints;
    }

    public int getMaxPoints() {
        return maxPoints;
    }

    public void setMaxPoints(int maxPoints) {
        this.maxPoints = maxPoints;
    }

    public int getDiscount() {
        return discount;
    }

    public void setDiscount(int discount) {
        this.discount = discount;
    }

    public int getShowPrice() {
        return showPrice;
    }

    public void setShowPrice(int showPrice) {
        this.showPrice = showPrice;
    }

    public int getSpecialRank() {
        return specialRank;
    }

    public void setSpecialRank(int specialRank) {
        this.specialRank = specialRank;
    }

    public int getIsDel() {
        return isDel;
    }

    public void setIsDel(int isDel) {
        this.isDel = isDel;
    }
}
